package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysFactoringMapper;
import com.ruoyi.system.domain.SysFactoring;
import com.ruoyi.system.service.ISysFactoringService;

/**
 * 租约保理申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-04
 */
@Service
public class SysFactoringServiceImpl implements ISysFactoringService 
{
    @Autowired
    private SysFactoringMapper sysFactoringMapper;

    /**
     * 查询租约保理申请
     * 
     * @param id 租约保理申请主键
     * @return 租约保理申请
     */
    @Override
    public SysFactoring selectSysFactoringById(Long id)
    {
        return sysFactoringMapper.selectSysFactoringById(id);
    }

    /**
     * 查询租约保理申请列表
     * 
     * @param sysFactoring 租约保理申请
     * @return 租约保理申请
     */
    @Override
    public List<SysFactoring> selectSysFactoringList(SysFactoring sysFactoring)
    {
        return sysFactoringMapper.selectSysFactoringList(sysFactoring);
    }

    /**
     * 新增租约保理申请
     * 
     * @param sysFactoring 租约保理申请
     * @return 结果
     */
    @Override
    public int insertSysFactoring(SysFactoring sysFactoring)
    {
        sysFactoring.setCreateTime(DateUtils.getNowDate());
        return sysFactoringMapper.insertSysFactoring(sysFactoring);
    }

    /**
     * 修改租约保理申请
     * 
     * @param sysFactoring 租约保理申请
     * @return 结果
     */
    @Override
    public int updateSysFactoring(SysFactoring sysFactoring)
    {
        sysFactoring.setUpdateTime(DateUtils.getNowDate());
        return sysFactoringMapper.updateSysFactoring(sysFactoring);
    }

    /**
     * 批量删除租约保理申请
     * 
     * @param ids 需要删除的租约保理申请主键
     * @return 结果
     */
    @Override
    public int deleteSysFactoringByIds(Long[] ids)
    {
        return sysFactoringMapper.deleteSysFactoringByIds(ids);
    }

    /**
     * 删除租约保理申请信息
     * 
     * @param id 租约保理申请主键
     * @return 结果
     */
    @Override
    public int deleteSysFactoringById(Long id)
    {
        return sysFactoringMapper.deleteSysFactoringById(id);
    }
}
